import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data,
    // baseURL: 'http://47.96.182.33:8081'
  })
}

export function getInfo(token) {
  return request({
    url: '/user/jurisdiction',
    method: 'get',
    // params: { token }
    // baseURL: 'http://47.96.182.33:8081'

  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}

// 批量上传教师文件
export function uploadTeacherExcel(data) {
  return request({
    url: '/user/upLoadTeachers',
    method: 'post',
    data
  })
}

// 批量上传幼儿文件
export function uploadStudentExcel(data) {
  return request({
    url: '/user/students',
    method: 'post',
    data
  })
}

//获取个人资料
export function getPersonal() {
  return request({
    url: '/user/info',
    method: 'get',
  })
}

//修改个人资料
export function updatePersonal(data) {
  return request({
    url: '/user/info',
    method: 'put',
    data
  })
}
